import { defHttp } from '/@/utils/http/axios';
import setting from '/@/settings/projectSetting';
import { ContentTypeEnum } from '/@/enums/httpEnum';

const Api = {
  flowGetDirTreeAll: `${setting.interfacePrefix}/flow/getDirTreeAll`, //流程管理左侧树
  formGetFields: `${setting.interfacePrefix}/form/getFields`, //取得表单中的所有字段
  getFieldsByModuleCode: `${setting.interfacePrefix}/form/getFieldsByModuleCode`, //获取模块对应表单中的字段
  getFieldsWithRelated: `${setting.interfacePrefix}/form/getFieldsWithRelated`, //取得表单及其关联表中的所有字段
  importSolution: `${setting.interfacePrefix}/form/importSolution`, //导入解决方案
  exportSolution: `${setting.interfacePrefix}/form/exportSolution`, //导出解决方案
  visualGetCondField: `${setting.interfacePrefix}/visual/getCondField`, //取得查询中的条件字段
  visualGetSourceFields: `${setting.interfacePrefix}/visual/getSourceFields`, //取得查询中的源字段
  adminFlowCreateNode: `${setting.interfacePrefix}/admin/flow/createNode`, //创建节点
  adminFlowEditNode: `${setting.interfacePrefix}/admin/flow/editNode`, //编辑时获取节点属性
  adminFlowUpdateNode: `${setting.interfacePrefix}/admin/flow/updateNode`, //编辑保存
  adminFlowDelNode: `${setting.interfacePrefix}/admin/flow/delNode`, //删除节点
  adminFlowMoveNode: `${setting.interfacePrefix}/admin/flow/moveNode`, //上下移动
  flowListTemplate: `${setting.interfacePrefix}/flow/listTemplate`, //公文模板
  visualListQuery: `${setting.interfacePrefix}/visual/listQuery`, //关联查询
  formListByFlowType: `${setting.interfacePrefix}/form/listByFlowType`, //流程类型下的表单
  adminFlowListPriv: `${setting.interfacePrefix}/admin/flow/listPriv`, //流程管理权限列表
  adminFlowCreatePriv: `${setting.interfacePrefix}/admin/flow/createPriv`, //流程管理权限列表添加
  adminFlowUpdatePriv: `${setting.interfacePrefix}/admin/flow/updatePriv`, //流程管理权限列表编辑
  adminFlowDelPriv: `${setting.interfacePrefix}/admin/flow/delPriv`, //流程管理权限列表删除
  adminSetRoleGroupUser: `${setting.interfacePrefix}/admin/setRoleGroupUser`, //查看设置权限
  adminDelRolePriv: `${setting.interfacePrefix}/admin/delRolePriv`, //查看设置权限角色删除
  adminDelUserPriv: `${setting.interfacePrefix}/admin/delUserPriv`, //查看设置权限用户删除
  adminDelGroupPriv: `${setting.interfacePrefix}/admin/delGroupPriv`, //查看设置用户组删除

  adminFlowGetFlowJson: `${setting.interfacePrefix}/admin/flow/getFlowJson`, //获取流程图
  adminFlowGetWorkflowProps: `${setting.interfacePrefix}/admin/flow/getWorkflowProps`, //获取流程详情
  myflowGenerateWorkflowString: `${setting.interfacePrefix}/myflow/generateWorkflowString`, //生成流程字符串
  adminUpdateWorkflowProps: `${setting.interfacePrefix}/admin/updateWorkflowProps`, //流程详情保存

  basicdataGetTree: `${setting.interfacePrefix}/basicdata/getTree?code=fileark_dir`, //取存档目录的接口
  flowGetActionsForProcessByFlowJson: `${setting.interfacePrefix}/flow/getActionsForProcessByFlowJson`, // 所选节点上的人员
  adminFlowListTaskStrategy: `${setting.interfacePrefix}/admin/flow/listTaskStrategy`, // 分配策略
  adminFlowListView: `${setting.interfacePrefix}/admin/flow/listView`, // 表单视图

  formGetNestFields: `${setting.interfacePrefix}/form/getNestFields`, // 主表中嵌套表的所有字段
  formGetNestFieldsWithFormName: `${setting.interfacePrefix}/form/getNestFieldsWithFormName`, // 主表中嵌套表的所有字段包含表名
  formGetFormElements: `${setting.interfacePrefix}/form/getFormElements`, // 取得表单中的元素，包括控件、表格行、span、div

  formGetFieldsOfUser: `${setting.interfacePrefix}/form/getFieldsOfUser`, // 获取表单用户

  adminFlowGetActionsForProcessByFlowJson: `${setting.interfacePrefix}/admin/flow/getActionsForProcessByFlowJson`, //提醒人员配置与所选节点上的人员共用一个接口，注意传参的时候，前者不用传internalName

  ideGetLeafPage: `${setting.interfacePrefix}/ide/getLeafPage`, // 取左边栏中的SQL语句及脚本库
  ideListTemplate: `${setting.interfacePrefix}/ide/listTemplate`, // 取脚本模板列表
  ideGetScriptTemplate: `${setting.interfacePrefix}/ide/getScriptTemplate`, // 取脚本模板的内容
  ideGetSqlsByFormCode: `${setting.interfacePrefix}/ide/getSqlsByFormCode`, // 取表单选项卡中的SQL语句及脚本库
  ideGetDbSources: `${setting.interfacePrefix}/ide/getDbSources`, // 取数据源
  ideGetTables: `${setting.interfacePrefix}/ide/getTables`, // 根据数据源取表名
  ideGetTableFields: `${setting.interfacePrefix}/ide/getTableFields`, // 取表中的字段
  ideGetSqlsByDb: `${setting.interfacePrefix}/ide/getSqlsByDb`, // 取数据源选项卡中的SQL语句及脚本库

  adminFlowGetTableColumns: `${setting.interfacePrefix}/admin/flow/getTableColumns`, // 取得回写外部数据时表中的字段
  adminFlowGetWriteBackPage: `${setting.interfacePrefix}/admin/flow/getWriteBackPage`, // 进入回写页面
  adminFlowGetWriteBackPageByDb: `${setting.interfacePrefix}/admin/flow/getWriteBackPageByDb`, // 进入回写外部数据页面
  adminFlowUpdateWriteBackByDb: `${setting.interfacePrefix}/admin/flow/updateWriteBackByDb`, // 保存外部数据源回写
  adminFlowUpdateWriteBack: `${setting.interfacePrefix}/admin/flow/updateWriteBack`, // 保存回写
  adminFlowClearWriteBack: `${setting.interfacePrefix}/admin/flow/clearWriteBack`, // 清除回写
  adminFlowClearWriteBackByDb: `${setting.interfacePrefix}/admin/flow/clearWriteBackByDb`, // 清除外部回写
  adminFlowGetEventScript: `${setting.interfacePrefix}/admin/flow/getEventScript`, // 取事件脚本
  adminFlowUpdateEventScriptByNode: `${setting.interfacePrefix}/admin/flow/updateEventScriptByNode`, // 保存流程节点上的事件脚本
  adminFlowUpdateEventScriptByFlow: `${setting.interfacePrefix}/admin/flow/updateEventScriptByFlow`, // 保存流程的事件脚本

  flowRunScript: `${setting.interfacePrefix}/flow/runScript`, // 运行脚本

  adminFlowGetViewRule: `${setting.interfacePrefix}/admin/flow/getViewRule`, // 取得流程中的显示规则
  adminFlowCopyViewRule: `${setting.interfacePrefix}/admin/flow/copyViewRule`, // 从表单中复制显示规则
  adminFlowSyncViewRule: `${setting.interfacePrefix}/admin/flow/syncViewRule`, // 将显示规则同步至表单
  adminFlowUpdateViewRule: `${setting.interfacePrefix}/admin/flow/updateViewRule`, // 保存流程中的显示规则
  adminFlowSetViewRule: `${setting.interfacePrefix}/admin/flow/setViewRule`, // 置是否使用表单中的规则
  adminFlowActions: `${setting.interfacePrefix}/admin/flow/getActionsForProcess`, // 取流程中的节点

  flowListRecord: `${setting.interfacePrefix}/flow/listRecord`, // 后台获取流程记录
  flowGetStatMonth: `${setting.interfacePrefix}/flow/getStatMonth`, // 流程月统计
  flowGetStatYear: `${setting.interfacePrefix}/flow/getStatYear`, // 流程年统计
  flowGetAnalysisYear: `${setting.interfacePrefix}/flow/getAnalysisYear`, // 流程效率分析

  flowGetActions: `${setting.interfacePrefix}/flow/getActions`, // 取流程中的节点
  flowChangeStatus: `${setting.interfacePrefix}/flow/changeStatus`, // 更改流程状态
  flowSubmitTo: `${setting.interfacePrefix}/flow/submitTo`, // 转交
  flowChangeActionStatus: `${setting.interfacePrefix}/flow/changeActionStatus`, // 更改节点状态
  flowRunDeliverScript: `${setting.interfacePrefix}/flow/runDeliverScript`, // 调用办理记录所在节点上的流转事件
  flowDelMyAction: `${setting.interfacePrefix}/flow/delMyAction`, // 删除办理记录 干预
  flowRecall: `${setting.interfacePrefix}/flow/recall`, // 强制回撤
  flowSetMyActionStatus: `${setting.interfacePrefix}/flow/setMyActionStatus`, // 置待办记录的状态，用于流程干预
  flowClearActionUser: `${setting.interfacePrefix}/flow/clearActionUser`, // 清除节点上的用户

  flowDelBatch: `${setting.interfacePrefix}/flow/delBatch`, // 批量删除流程  注意当状态为已删除时，删除流程时调用delBatch接口，其它状态时调用delToDustbin接口
  flowDelToDustbin: `${setting.interfacePrefix}/flow/delToDustbin`, // 删至回收站
  flowDiscardBatch: `${setting.interfacePrefix}/flow/discardBatch`, // 批量放弃
  flowRefreshFlow: `${setting.interfacePrefix}/flow/refreshFlow`, // 更新流程
  flowRefreshFlowBatch: `${setting.interfacePrefix}/flow/refreshFlowBatch`, // 批量更新流程
  flowRecover: `${setting.interfacePrefix}/flow/recover`, // 恢复流程

  flowSequenceList: `${setting.interfacePrefix}/flow/sequence/list`, // 自动编号列表
  flowSequenceDel: `${setting.interfacePrefix}/flow/sequence/del`, // 自动编号列表删除
  flowSequenceCreate: `${setting.interfacePrefix}/flow/sequence/create`, // 自动编号列表创建
  flowSequenceEditPage: `${setting.interfacePrefix}/flow/sequence/editPage`, // 自动编号列表修改详情
  flowSequenceUpdate: `${setting.interfacePrefix}/flow/sequence/update`, // 自动编号列表修改

  flowListFlowTypeForHandover: `${setting.interfacePrefix}/flow/listFlowTypeForHandover`, // 流程移交类型
  flowHandover: `${setting.interfacePrefix}/flow/handover`, // 流程移交

  flowStatperFormanceListByDept: `${setting.interfacePrefix}/flow/stat/performance/listByDept`, // 部门绩效列表
  flowStatExportListByDept: `${setting.interfacePrefix}/flow/stat/exportListByDept`, // 导出绩效统计.xls
  flowStatperformanceStatDeptByMonth: `${setting.interfacePrefix}/flow/stat/performance/statDeptByMonth`, // 部门绩效月统计
  flowStatPerformanceStatDeptByYear: `${setting.interfacePrefix}/flow/stat/performance/statDeptByYear`, // 部门绩效年统计
  flowStatPerformanceStatDeptPersonByMonth: `${setting.interfacePrefix}/flow/stat/performance/statDeptPersonByMonth`, // 部门人员绩效月统计
  flowStatPerformanceStatDeptPersonByYear: `${setting.interfacePrefix}/flow/stat/performance/statDeptPersonByYear`, // 部门人员绩效年统计
  flowStatPerformanceListCountByDept: `${setting.interfacePrefix}/flow/stat/performance/listCountByDept`, // 月流程处理次数
  flowStatPerformanceListAverageByDept: `${setting.interfacePrefix}/flow/stat/performance/listAverageByDept`, // 月流程处理平均绩效
  flowStatExportListCountByDept: `${setting.interfacePrefix}/flow/stat/exportListCountByDept`, // 导出流程数量统计.xls
  flowStatExportListAverageByDept: `${setting.interfacePrefix}/flow/stat/exportListAverageByDept`, // 导出平均绩效统计.xls
  flowStatPerformanceListUserAttend: `${setting.interfacePrefix}/flow/stat/performance/listUserAttend`, // 列出用户参与的流程绩效
  flowStatPerformanceUpdateByMyActionId: `${setting.interfacePrefix}/flow/stat/performance/updateByMyActionId`, // 修改绩效

  flowStatExportLis: `${setting.interfacePrefix}/flow/stat/list`, // 流程统计

  paperList: `${setting.interfacePrefix}/paper/list`, // 公文模板列表
  paperGetUnitTree: `${setting.interfacePrefix}/paper/getUnitTree`, // 获取单位树形结构
  paperCreate: `${setting.interfacePrefix}/paper/create`, // 创建模板
  paperUpdate: `${setting.interfacePrefix}/paper/update`, // 修改模板
  paperDel: `${setting.interfacePrefix}/paper/del`, // 删除模板
  flowGetTemplateFile: `${setting.interfacePrefix}/flow/getTemplateFile`, // 下载模板

  stampList: `${setting.interfacePrefix}/stamp/list`, // 印章列表
  stampDel: `${setting.interfacePrefix}/stamp/del`, // 删除印章
  stampCreate: `${setting.interfacePrefix}/stamp/create`, // 创建印章
  stampUpdate: `${setting.interfacePrefix}/stamp/update`, // 修改印章
  stamListLog: `${setting.interfacePrefix}/stamp/listLog`, // 印章日志列表
  stamDelLog: `${setting.interfacePrefix}/stamp/delLog`, // 删除印章日志
  stamGetAllStamp: `${setting.interfacePrefix}/stamp/getAllStamp`, // 取得全部印章

  configList: `${setting.interfacePrefix}/config/list`, // 配置管理
  configCreateConfigItem: `${setting.interfacePrefix}/config/createConfigItem`, // 配置管理新建
  configEditEmailPage: `${setting.interfacePrefix}/config/editEmailPage`, // 编辑Email
  configUpdateConfig: `${setting.interfacePrefix}/config/updateConfig`, // 保存配置
  configHideElement: `${setting.interfacePrefix}/config/hideElement`, // 隐藏配置
  configDelElement: `${setting.interfacePrefix}/config/delElement`, // 删除配置
  configUpdateEmail: `${setting.interfacePrefix}/config/updateEmail`, // 保存Email配置
  configEditFlowButtonPage: `${setting.interfacePrefix}/config/editFlowButtonPage`, // 编辑流程按钮配置页面
  configUpdateFlowButton: `${setting.interfacePrefix}/config/updateFlowButton`, // 保存流程按钮配置
  configEditUserLevelPage: `${setting.interfacePrefix}/config/editUserLevelPage`, // 编辑用户等级页面
  configCreateUserLevel: `${setting.interfacePrefix}/config/createUserLevel`, // 创建用户等级
  configUpdateUserLevel: `${setting.interfacePrefix}/config/updateUserLevel`, // 保存用户等级
  configDelUserLevel: `${setting.interfacePrefix}/config/delUserLevel`, // 删除用户等级
  configEditSecurityPage: `${setting.interfacePrefix}/config/editSecurityPage`, // 编辑安全配置页面
  configUpdateSecurity: `${setting.interfacePrefix}/config/updateSecurity`, // 保存安全配置
  configSetSms: `${setting.interfacePrefix}/config/setSms`, // 置是否启用短信
  configEditDeveloperPage: `${setting.interfacePrefix}/config/editDeveloperPage`, // 编辑开发者页面
  configUpdateDeveloper: `${setting.interfacePrefix}/config/updateDeveloper`, // 保存开发者
  configDelDeveloper: `${setting.interfacePrefix}/config/delDeveloper`, // 删除开发者
  configCreateDeveloper: `${setting.interfacePrefix}/config/createDeveloper`, // 创建开发者

  adminDataSourceList: `${setting.interfacePrefix}/admin/dataSource/list`, // 数据源列表
  adminDataSourceUpdate: `${setting.interfacePrefix}/admin/dataSource/update`, // 数据源修改
  adminDataSourceCreate: `${setting.interfacePrefix}/admin/dataSource/create`, // 创建数据源
  adminDataSourceEditPage: `${setting.interfacePrefix}/admin/dataSource/editPage`, // 编辑数据源页面
  adminDataSourceDelete: `${setting.interfacePrefix}/admin/dataSource/delete`, // 删除数据源

  adminSetDebugMode: `${setting.interfacePrefix}/admin/setDebugMode`, // 设置调试模式
  adminApplyWorkflow: `${setting.interfacePrefix}/admin/applyWorkflow`, // 套用

  adminFlowEditFreeFlowPage: `${setting.interfacePrefix}/admin/flow/editFreeFlowPage`, // 自由流程设置
  adminFlowUpdateFreeFlow: `${setting.interfacePrefix}/admin/flow/updateFreeFlow`, // 自由流程保存

  flowMacroGetFontAwesome: `${setting.interfacePrefix}/flow/macro/getFontAwesome`, // 图标
  flowGetDirTreeForScheduler: `${setting.interfacePrefix}/flow/getDirTreeForScheduler`, // 获取调度需用到的目录树

  userProxyList: `${setting.interfacePrefix}/user/proxy/list`, // 列出代理
  userProxyCreate: `${setting.interfacePrefix}/user/proxy/create`, // 代理新增
  userProxyUpdate: `${setting.interfacePrefix}/user/proxy/update`, // 代理编辑
  userProxyDel: `${setting.interfacePrefix}/user/proxy/del`, // 代理删除
  userProxyReset: `${setting.interfacePrefix}/user/proxy/reset`, // 代理重置
  userProxyListMine: `${setting.interfacePrefix}/user/proxy/listMine`, // 我的代理
  userProxylListProxy: `${setting.interfacePrefix}/user/proxy/listProxy`, // 代理重置

  paperListPaperNo: `${setting.interfacePrefix}/paper/listPaperNo`, // 列出文号
  paperCreatePaperNo: `${setting.interfacePrefix}/paper/createPaperNo`, // 添加文号
  paperUpdatePaperNo: `${setting.interfacePrefix}/paper/updatePaperNo`, // 修改文号
  paperDelPaperNo: `${setting.interfacePrefix}/paper/delPaperNo`, // 删除文号
  paperListPaperNoValue: `${setting.interfacePrefix}/paper/listPaperNoValue`, // 列出文号值
  paperUpdatePaperNoValue: `${setting.interfacePrefix}/paper/updatePaperNoValue`, // 保存文号值
  paperDelPaperNoValue: `${setting.interfacePrefix}/paper/delPaperNoValue`, // 删除文号值
};

export const getFlowGetDirTreeAll = (params?: any) =>
  defHttp.post<any>({ url: Api.flowGetDirTreeAll, params });
export const getFormGetFields = (params?: any) =>
  defHttp.post<any>({ url: Api.formGetFields, params });
export const getFieldsByModuleCode = (params?: any) =>
  defHttp.post({ url: Api.getFieldsByModuleCode, params });
export const getFieldsWithRelated = (params?: any) =>
  defHttp.post<any>({ url: Api.getFieldsWithRelated, params });

export const getVisualGetCondField = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetCondField, params });
export const getVisualGetSourceFields = (params?: any) =>
  defHttp.post<any>({ url: Api.visualGetSourceFields, params });

export const getAdminFlowCreateNode = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowCreateNode, params });
export const getAdminFlowEditNode = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowEditNode, params });
export const getAdminFlowDelNode = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowDelNode, params });
export const getAdminFlowMoveNode = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowMoveNode, params });
export const getAdminFlowUpdateNode = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowUpdateNode, params });
export const getFlowListTemplate = (params?: any) =>
  defHttp.post<any>({ url: Api.flowListTemplate, params });
export const getVisualListQuery = (params?: any) =>
  defHttp.post<any>({ url: Api.visualListQuery, params });
export const getFormListByFlowType = (params?: any) =>
  defHttp.post<any>({ url: Api.formListByFlowType, params });
export const getAdminFlowListPriv = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowListPriv, params });
export const getAdminFlowCreatePriv = (params?: any) =>
  defHttp.post<any>({
    url: Api.adminFlowCreatePriv,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getAdminSetRoleGroupUser = (params?: any) =>
  defHttp.post<any>({
    url: Api.adminSetRoleGroupUser,
    params,
  });
export const getAdminDelRolePriv = (params?: any) =>
  defHttp.post<any>({
    url: Api.adminDelRolePriv,
    params,
  });
export const getAdminDelUserPriv = (params?: any) =>
  defHttp.post<any>({
    url: Api.adminDelUserPriv,
    params,
  });
export const getAdminDelGroupPriv = (params?: any) =>
  defHttp.post<any>({
    url: Api.adminDelGroupPriv,
    params,
  });

export const getAdminFlowUpdatePriv = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowUpdatePriv, params });
export const getAdminFlowDelPriv = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowDelPriv, params });

export const getAdminFlowGetFlowJson = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowGetFlowJson, params });

export const getMyflowGenerateWorkflowString = (params?: any) =>
  defHttp.post<any>({ url: Api.myflowGenerateWorkflowString, params });
export const getAdminUpdateWorkflowProps = (params?: any) =>
  defHttp.post<any>({ url: Api.adminUpdateWorkflowProps, params });

export const getAdminFlowGetWorkflowProps = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowGetWorkflowProps, params });

export const getBasicdataGetTree = (params?: any) =>
  defHttp.get<any>({ url: Api.basicdataGetTree, params });
export const getFlowGetActionsForProcessByFlowJson = (params?: any) =>
  defHttp.post<any>({ url: Api.flowGetActionsForProcessByFlowJson, params });

export const getAdminFlowListTaskStrategy = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowListTaskStrategy, params });
export const getAdminFlowListView = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowListView, params });

export const getFormGetNestFields = (params?: any) =>
  defHttp.post<any>({ url: Api.formGetNestFields, params });

export const getFormGetNestFieldsWithFormName = (params?: any) =>
  defHttp.post<any>({ url: Api.formGetNestFieldsWithFormName, params });
export const getFormGetFormElements = (params?: any) =>
  defHttp.post<any>({ url: Api.formGetFormElements, params });

export const getFormGetFieldsOfUser = (params?: any) =>
  defHttp.post<any>({ url: Api.formGetFieldsOfUser, params });

export const getAdminFlowGetActionsForProcessByFlowJson = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowGetActionsForProcessByFlowJson, params });

export const getIdeListTemplate = (params?: any) =>
  defHttp.post<any>({ url: Api.ideListTemplate, params });

export const getIdeGetScriptTemplate = (params?: any) =>
  defHttp.post<any>({ url: Api.ideGetScriptTemplate, params });

export const getIdeGetSqlsByFormCode = (params?: any) =>
  defHttp.post<any>({ url: Api.ideGetSqlsByFormCode, params });
export const getIdeGetDbSources = (params?: any) =>
  defHttp.post<any>({ url: Api.ideGetDbSources, params });
export const getIdeGetTables = (params?: any) =>
  defHttp.post<any>({ url: Api.ideGetTables, params });
export const getIdeGetTableFields = (params?: any) =>
  defHttp.post<any>({ url: Api.ideGetTableFields, params });
export const getIdeGetSqlsByDb = (params?: any) =>
  defHttp.post<any>({ url: Api.ideGetSqlsByDb, params });

export const getAdminFlowUpdateWriteBackByDb = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowUpdateWriteBackByDb, params });
export const getAdminFlowUpdateWriteBack = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowUpdateWriteBack, params });
export const getAdminFlowClearWriteBack = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowClearWriteBack, params });
export const getAdminFlowClearWriteBackByDb = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowClearWriteBackByDb, params });

export const getAdminFlowGetEventScript = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowGetEventScript, params });
export const getAdminFlowUpdateEventScriptByNode = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowUpdateEventScriptByNode, params });
export const getAdminFlowUpdateEventScriptByFlow = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowUpdateEventScriptByFlow, params });
export const getFlowRunScript = (params?: any) =>
  defHttp.post<any>({ url: Api.flowRunScript, params });

export const getAdminFlowGetTableColumns = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowGetTableColumns, params });

export const getAdminFlowGetWriteBackPage = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowGetWriteBackPage, params });

export const getAdminFlowGetWriteBackPageByDb = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowGetWriteBackPageByDb, params });

export const getAdminFlowGetViewRule = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowGetViewRule, params });

export const getAdminFlowCopyViewRule = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowCopyViewRule, params });

export const getAdminFlowSyncViewRule = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowSyncViewRule, params });

export const getAdminFlowUpdateViewRule = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowUpdateViewRule, params });

export const getAdminFlowActions = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowActions, params });

export const getAdminFlowSetViewRule = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowSetViewRule, params });

export const getFlowListRecord = (params?: any) =>
  defHttp.post<any>({ url: Api.flowListRecord, params });

export const getFlowGetStatMonth = (params?: any) =>
  defHttp.post<any>({ url: Api.flowGetStatMonth, params });
export const getFlowGetStatYear = (params?: any) =>
  defHttp.post<any>({ url: Api.flowGetStatYear, params });
export const getFlowGetAnalysisYear = (params?: any) =>
  defHttp.post<any>({ url: Api.flowGetAnalysisYear, params });

export const getFlowGetActions = (params?: any) =>
  defHttp.post<any>({ url: Api.flowGetActions, params });
export const getFlowDelMyAction = (params?: any) =>
  defHttp.post<any>({ url: Api.flowDelMyAction, params });
export const getFlowSubmitTo = (params?: any) =>
  defHttp.post<any>({ url: Api.flowSubmitTo, params });
export const getFlowChangeActionStatus = (params?: any) =>
  defHttp.post<any>({ url: Api.flowChangeActionStatus, params });
export const getFlowChangeStatus = (params?: any) =>
  defHttp.post<any>({ url: Api.flowChangeStatus, params });

export const getFlowRunDeliverScript = (params?: any) =>
  defHttp.post<any>({ url: Api.flowRunDeliverScript, params });
export const getFlowRecall = (params?: any) => defHttp.post<any>({ url: Api.flowRecall, params });
export const getFlowSetMyActionStatus = (params?: any) =>
  defHttp.post<any>({ url: Api.flowSetMyActionStatus, params });
export const getFlowClearActionUser = (params?: any) =>
  defHttp.post<any>({ url: Api.flowClearActionUser, params });

export const getFlowDelBatch = (params?: any) =>
  defHttp.post<any>({ url: Api.flowDelBatch, params });
export const getFlowDelToDustbin = (params?: any) =>
  defHttp.post<any>({ url: Api.flowDelToDustbin, params });
export const getFlowDiscardBatch = (params?: any) =>
  defHttp.post<any>({ url: Api.flowDiscardBatch, params });
export const getFlowRefreshFlow = (params?: any) =>
  defHttp.post<any>({ url: Api.flowRefreshFlow, params });
export const getFlowRefreshFlowBatch = (params?: any) =>
  defHttp.post<any>({ url: Api.flowRefreshFlowBatch, params });
export const getFlowRecover = (params?: any) => defHttp.post<any>({ url: Api.flowRecover, params });

export const getFlowSequenceList = (params?: any) =>
  defHttp.post<any>({ url: Api.flowSequenceList, params });
export const getFlowSequenceDel = (params?: any) =>
  defHttp.post<any>({ url: Api.flowSequenceDel, params });
export const getFlowSequenceCreate = (params?: any) =>
  defHttp.post<any>({ url: Api.flowSequenceCreate, params });
export const getFlowSequenceEditPage = (params?: any) =>
  defHttp.post<any>({ url: Api.flowSequenceEditPage, params });
export const getFlowSequenceUpdate = (params?: any) =>
  defHttp.post<any>({ url: Api.flowSequenceUpdate, params });

export const getFlowListFlowTypeForHandover = (params?: any) =>
  defHttp.post<any>({ url: Api.flowListFlowTypeForHandover, params });
export const getFlowHandover = (params?: any) =>
  defHttp.post<any>({ url: Api.flowHandover, params });

export const getFlowStatperFormanceListByDept = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatperFormanceListByDept, params });
export const getFlowStatExportListByDept = (params?: any) =>
  defHttp.post<any>(
    { url: Api.flowStatExportListByDept, params, responseType: 'blob' },
    {
      isReturnNativeResponse: true,
    },
  );
export const getFlowStatperformanceStatDeptByMonth = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatperformanceStatDeptByMonth, params });
export const getFlowStatPerformanceStatDeptByYear = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatPerformanceStatDeptByYear, params });
export const getFlowStatPerformanceStatDeptPersonByMonth = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatPerformanceStatDeptPersonByMonth, params });
export const getFlowStatPerformanceStatDeptPersonByYear = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatPerformanceStatDeptPersonByYear, params });
export const getFlowStatPerformanceListCountByDept = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatPerformanceListCountByDept, params });
export const getFlowStatPerformanceListAverageByDept = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatPerformanceListAverageByDept, params });
export const getFlowStatExportListCountByDept = (params?: any) =>
  defHttp.post<any>(
    { url: Api.flowStatExportListCountByDept, params, responseType: 'blob' },
    {
      isReturnNativeResponse: true,
    },
  );
export const getFlowStatExportListAverageByDept = (params?: any) =>
  defHttp.post<any>(
    { url: Api.flowStatExportListAverageByDept, params, responseType: 'blob' },
    {
      isReturnNativeResponse: true,
    },
  );
export const getFlowStatList = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatExportLis, params });

export const getFlowStatPerformanceListUserAttend = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatPerformanceListUserAttend, params });
export const getFlowStatPerformanceUpdateByMyActionId = (params?: any) =>
  defHttp.post<any>({ url: Api.flowStatPerformanceUpdateByMyActionId, params });

export const getPaperList = (params?: any) => defHttp.post<any>({ url: Api.paperList, params });
export const getPaperGetUnitTree = (params?: any) =>
  defHttp.post<any>({ url: Api.paperGetUnitTree, params });
export const getPaperCreate = (params?: any) =>
  defHttp.post<any>({
    url: Api.paperCreate,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });
export const getPaperUpdate = (params?: any) =>
  defHttp.post<any>({
    url: Api.paperUpdate,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });
export const getPaperDel = (params?: any) => defHttp.post<any>({ url: Api.paperDel, params });

export const getStampList = (params?: any) => defHttp.post<any>({ url: Api.stampList, params });
export const getStampDel = (params?: any) => defHttp.post<any>({ url: Api.stampDel, params });
export const getStampCreate = (params?: any) =>
  defHttp.post<any>({
    url: Api.stampCreate,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });
export const getStampUpdate = (params?: any) =>
  defHttp.post<any>({
    url: Api.stampUpdate,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });
export const getStamListLog = (params?: any) => defHttp.post<any>({ url: Api.stamListLog, params });
export const getStamDelLog = (params?: any) => defHttp.post<any>({ url: Api.stamDelLog, params });
export const getStamGetAllStamp = (params?: any) =>
  defHttp.post<any>({ url: Api.stamGetAllStamp, params });

export const getConfigList = (params?: any) => defHttp.post<any>({ url: Api.configList, params });
export const getConfigCreateConfigItem = (params?: any) =>
  defHttp.post<any>({ url: Api.configCreateConfigItem, params });

export const getConfigEditEmailPage = (params?: any) =>
  defHttp.post<any>({ url: Api.configEditEmailPage, params });
export const getConfigUpdateConfig = (params?: any) =>
  defHttp.post<any>({ url: Api.configUpdateConfig, params });
export const getConfigHideElement = (params?: any) =>
  defHttp.post<any>({ url: Api.configHideElement, params });
export const getConfigDelElement = (params?: any) =>
  defHttp.post<any>({ url: Api.configDelElement, params });
export const getConfigUpdateEmail = (params?: any) =>
  defHttp.post<any>({ url: Api.configUpdateEmail, params });
export const getConfigEditFlowButtonPage = (params?: any) =>
  defHttp.post<any>({ url: Api.configEditFlowButtonPage, params });
export const getConfigUpdateFlowButton = (params?: any) =>
  defHttp.post<any>({ url: Api.configUpdateFlowButton, params });
export const getConfigEditUserLevelPage = (params?: any) =>
  defHttp.post<any>({ url: Api.configEditUserLevelPage, params });
export const getConfigCreateUserLevel = (params?: any) =>
  defHttp.post<any>({ url: Api.configCreateUserLevel, params });
export const getConfigUpdateUserLevel = (params?: any) =>
  defHttp.post<any>({ url: Api.configUpdateUserLevel, params });
export const getConfigDelUserLevel = (params?: any) =>
  defHttp.post<any>({ url: Api.configDelUserLevel, params });
export const getConfigEditSecurityPage = (params?: any) =>
  defHttp.post<any>({ url: Api.configEditSecurityPage, params });
export const getConfigUpdateSecurity = (params?: any) =>
  defHttp.post<any>({ url: Api.configUpdateSecurity, params });
export const getConfigSetSms = (params?: any) =>
  defHttp.post<any>({ url: Api.configSetSms, params });
export const getConfigEditDeveloperPage = (params?: any) =>
  defHttp.post<any>({ url: Api.configEditDeveloperPage, params });
export const getConfigUpdateDeveloper = (params?: any) =>
  defHttp.post<any>({ url: Api.configUpdateDeveloper, params });
export const getConfigDelDeveloper = (params?: any) =>
  defHttp.post<any>({ url: Api.configDelDeveloper, params });
export const getConfigCreateDeveloper = (params?: any) =>
  defHttp.post<any>({ url: Api.configCreateDeveloper, params });

export const getFlowGetTemplateFile = (params?: any) =>
  defHttp.post<any>(
    { url: Api.flowGetTemplateFile, params, responseType: 'blob' },
    {
      isReturnNativeResponse: true,
    },
  );

export const getAdminDataSourceList = (params?: any) =>
  defHttp.post<any>({ url: Api.adminDataSourceList, params });
export const getAdminDataSourceUpdate = (params?: any) =>
  defHttp.post<any>({ url: Api.adminDataSourceUpdate, params });
export const getAdminDataSourceCreate = (params?: any) =>
  defHttp.post<any>({ url: Api.adminDataSourceCreate, params });
export const getAdminDataSourceEditPage = (params?: any) =>
  defHttp.post<any>({ url: Api.adminDataSourceEditPage, params });
export const getAdminDataSourceDelete = (params?: any) =>
  defHttp.post<any>({ url: Api.adminDataSourceDelete, params });

export const getAdminSetDebugMode = (params?: any) =>
  defHttp.post<any>({ url: Api.adminSetDebugMode, params });
export const getAdminApplyWorkflow = (params?: any) =>
  defHttp.post<any>({ url: Api.adminApplyWorkflow, params });

export const getAdminFlowEditFreeFlowPage = (params?: any) =>
  defHttp.post<any>({ url: Api.adminFlowEditFreeFlowPage, params });
export const getAdminFlowUpdateFreeFlow = (params?: any) =>
  defHttp.post<any>({
    url: Api.adminFlowUpdateFreeFlow,
    params,
    headers: { 'Content-Type': ContentTypeEnum.JSON },
  });
export const getFlowMacroGetFontAwesome = (params?: any) =>
  defHttp.post<any>({ url: Api.flowMacroGetFontAwesome, params });
export const getFlowGetDirTreeForScheduler = (params?: any) =>
  defHttp.post<any>({ url: Api.flowGetDirTreeForScheduler, params });

export const getUserProxyList = (params?: any) =>
  defHttp.post<any>({ url: Api.userProxyList, params });
export const getUserProxyCreate = (params?: any) =>
  defHttp.post<any>({ url: Api.userProxyCreate, params });
export const getUserProxyUpdate = (params?: any) =>
  defHttp.post<any>({ url: Api.userProxyUpdate, params });
export const getUserProxyDel = (params?: any) =>
  defHttp.post<any>({ url: Api.userProxyDel, params });
export const getUserProxyReset = (params?: any) =>
  defHttp.post<any>({ url: Api.userProxyReset, params });
export const getUserProxyListMine = (params?: any) =>
  defHttp.post<any>({ url: Api.userProxyListMine, params });
export const getUserProxylListProxy = (params?: any) =>
  defHttp.post<any>({ url: Api.userProxylListProxy, params });

export const getPaperListPaperNo = (params?: any) =>
  defHttp.post<any>({ url: Api.paperListPaperNo, params });
export const getPaperCreatePaperNo = (params?: any) =>
  defHttp.post<any>({ url: Api.paperCreatePaperNo, params });
export const getPaperUpdatePaperNo = (params?: any) =>
  defHttp.post<any>({ url: Api.paperUpdatePaperNo, params });
export const getPaperDelPaperNo = (params?: any) =>
  defHttp.post<any>({ url: Api.paperDelPaperNo, params });
export const getPaperListPaperNoValue = (params?: any) =>
  defHttp.post<any>({ url: Api.paperListPaperNoValue, params });
export const getPaperUpdatePaperNoValue = (params?: any) =>
  defHttp.post<any>({ url: Api.paperUpdatePaperNoValue, params });
export const getPaperDelPaperNoValue = (params?: any) =>
  defHttp.post<any>({ url: Api.paperDelPaperNoValue, params });

export const exportSolution = (params?: any) =>
  defHttp.post<any>(
    { url: Api.exportSolution, params, responseType: 'blob' },
    {
      isTransformResponse: false,
    },
  );

export const importSolution = (params?: any) =>
  defHttp.post<any>({
    url: Api.importSolution,
    params,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryVD0qp8RY7NId5ucK',
    },
  });
